<template>
  <d2-container>
  <div class="app-container">
    <el-container :style="'height:'+containerHeight+'px'">
      <el-main class="">
        <div style="margin-bottom: 10px">
              <el-button @click="getList()">刷新</el-button>
              <el-button type="primary" @click="toCreate()">新增</el-button>
        </div>
        <div class="page-list1">
          <div>
            <!--<div class="nav">-->
             <!--&lt;!&ndash; <label>组图列表</label>&ndash;&gt;-->
            <!--</div>-->
            <el-row :span="24" >
              <el-col :span="10"
                class="topo1"
                v-for="(item, index) of data.list"
                :key="index"
                :title="item.desc"

              >
                <!--<div class="image">-->
                <!--<img :src="item.image" />-->
                <!--</div>-->
                <div class="ph15 pv10" style="position: relative;">
                  <a href="javascript:void(0)" class="yicititle line1 one"   @click="onShow(item)">{{ item.name }}</a>
                  <!--<div class="desc line two mt5 theme-front-color" :title="item.desc">{{ item.desc }}</div>-->
                  <div class="flex1 mt51">
                    <div style="width: 100%">
                      <a href="javascript:void(0)" class="hover pointer mr15" title="查看" @click="onShow(item)">
                        <i
                          class="yicititle el-icon-document"
                          :class="{'iconfont el-icon-document':!item.stared, 'iconfont el-icon-document':item.stared}"
                        ></i>
                        <span class="yicititle ml5">查看</span>
                      </a>
                      <a href="javascript:void(0)" style="margin-left: 10px" class="hover pointer" title="编辑" @click="onOpen(item)">
                        <i
                          class="yicititle el-icon-edit"
                          :class="{'iconfont el-icon-edit':!item.favorited, 'iconfont el-icon-edit':item.favorited}"
                        ></i>
                        <span class="yicititle ml5">编辑</span>
                      </a>
                      <a href="javascript:void(0)" style="margin-left: 40px" title="删除" @click="deleteitem(item)">
                        <i
                          class="yicititle el-icon-close"
                          :class="{'iconfont el-icon-delete':!item.favorited, 'iconfont el-icon-delete':item.favorited}"
                        ></i>
                        <span class="yicititle ml5">删除</span>
                      </a>
                    </div>
                  </div>
                </div>

              </el-col>
            </el-row>
            <div>
              <el-pagination
                @current-change="currentChangeHandle"
                :current-page="search.pageIndex"
                :page-size="search.pageCount"
                layout=" prev, pager, next, jumper, total"
                :total="data.count"
              ></el-pagination>
            </div>
          </div>
        </div>
      </el-main>
    </el-container>
  </div>
  </d2-container>
</template>

<script>
  import TableTreeColumn from "@/components/table-tree-column";
  import { treeDataTranslate } from "@/utils";
  import * as Util from "@/utils";
  export default {
    data() {
      return {
        updateMenuNode:'',
        dataForm: {
          meterCode: "",
          deviceName:''
        },
        operType:'',
        oldobj:{},
        form: {
          workmodel: "",
          windstatu: "",
          doorstat: "",
          keylock: "",
          temperature: ""
        },
        dataFormBuild: {
          buildingId: "",
          buildingName: "",
          parentBuildingId: "-1",
          buildingType: "",
          buildingArea: "",
          buildingPersons: "",
          projectId: "",
          parentBuildingName: ""
        },
        showInfo: true,
        treeHeight: 200,
        containerHeight: 300,
        menuVisible: false,
        dataLoading: false,
        opmenuTitle: "模式设置",
        menuVisibledialog: false,
        dataList: [],
        meterdataList: [],
        pageIndex: 1,
        pageSize: 6,
        totalPage: 0,
        dataListLoading: false,
        dataListSelections: [],
        addOrUpdateVisible: false,
        addOrUpdateVisiblemeter: false,
        buildTypeList: [],
        projectList: [],
        menuListTreeProps: {
          label: "buildingName",
          children: "children"
        },
        currentNode: "",
        meterTypeList: [],
        subitemTypeList: [],
        subitemValueList: [],
        meterInfoList: [],
        currentbuildInfo: {},
        dataRule: {
          buildingName: [
            { required: true, message: "区域名称不能为空", trigger: "blur" }
          ],
          parentBuildingId: [
            { required: true, message: "所属区域不能为空", trigger: "blur" }
          ],
          buildingType: [
            { required: true, message: "区域类型不能为空", trigger: "blur" }
          ],
          buildingArea: [
            { required: true, message: "区域面积不能为空", trigger: "blur" }
          ],
          buildingPersons: [
            { required: true, message: "容纳人数不能为空", trigger: "blur" }
          ],
          projectId: [
            { required: true, message: "项目编号不能为空", trigger: "blur" }
          ]
        },
        viewVisile:false,
        viewData:{},
        meterCode:"",
        collectTypeValue:{
          '50002':{ //开关机状态
            '0':'关机',
            '1':'开机'
          },
          '50004':{ //工作模式
            '0':'空',
            '1':'自动',
            '2':'辅助加热',
            '3':'除湿',
            '4':'制热',
            '5':'制冷',
            '6':'通风',
            '7':'单地暖制热',
            '8':'地暖盘管同时'
          },
          '50005':{ //风机状态
            '0':'停止',
            '1':'低速',
            '2':'中速',
            '3':'高速',
            '4':'自动',
            '5':'自动低速',
            '6':'自动中速',
            '7':'自动高速'
          },
          '50006':{ //阀状态
            '0':'关阀',
            '1':'开阀'
          },
          '50007':{ //键盘锁
            '0':'开锁',
            '1':'锁定',
            '2':'高级锁定'
          }
        },
        data: {
          list: [],
          count: 0
        },
        search: {
          pageIndex: 1,
          pageCount: 16
        }
      };
    },
    components: {
      TableTreeColumn
    },
    filters: {
      // collectTypeNames: function(value,type) {
      //   return this.collectTypeValue[type][value]
      // },
      buildTypeName: function(value, statusList) {
        for (let i = 0; i < statusList.length; i++) {
          if (statusList[i].paramKey === value) {
            return statusList[i].paramValue;
          }
        }
      },
      projectName: function(value, statusList) {
        for (let i = 0; i < statusList.length; i++) {
          if (statusList[i].projectId === value) {
            return (
              statusList[i].projectName + "[" + statusList[i].projectId + "]"
            );
          }
        }
      },
      statusName: function(value, statusList) {
        for (let i = 0; i < statusList.length; i++) {
          if (statusList[i].value === value) {
            return statusList[i].label;
          }
        }
      },
      meterTypeName: function(value, statusList) {
        for (let i = 0; i < statusList.length; i++) {
          if (statusList[i].paramKey === value) {
            return statusList[i].paramValue;
          }
        }
      },
      materName: function(value, statusList) {
        for (let i = 0; i < statusList.length; i++) {
          if (statusList[i].meterCode === value) {
            return statusList[i].meterCode + "[" + statusList[i].meterAddr + "]";
          }
        }
      }
    },
    created() {
      // this.getMeterDataList();
      this.setContentHeight();
      // this.queryStatic("buildingType");
      // this.getProjectDataList();
     // this.getDataList();
      this.getList();
    },
    destroyed(){
      if(this.timeOut){
        clearTimeout(this.timeOut);
      }
    },
    computed:{
      tableHeight(){
        return Util.getClientHeight()-410;
      }
    },
    methods: {
      toCreate(){
        this.$router.push({ path: '/newWork'})
      },
      onShow(item) {
        this.$router.push({ path: '/showTu', query: { id: item.id } })
      },
      onOpen(item) {
        this.$router.push({ path: '/newWork', query: { id: item.id } })
      },
      async deleteitem(item) {
        this.$confirm(`确定对删除操作?`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {

          this.$api.okhttp({
            url: this.$http.adornUrl("/topologies/del"),
            method: "post",
            data: this.$http.adornData({
              id: item.id,
              customerId: this.$util.cookies.get("customer_id")
            })
          }).then((data) => {
            if (data && data.code === 0) {
            this.$message({
              message: "操作成功",
              type: "success",
              duration: 1500,
              onClose: () => {
              this.search.pageIndex =1
              this.getList()
          }
          });
          } else {
            this.$message.error("操作失败!");
          }
        });

      })
      },

        getList() {
          this.$api.okhttp({
            url: this.$http.adornUrl("/topologies/findByPage"),
            method: "get",
            params: this.$http.adornParams({
              pageNum: this.search.pageIndex,
              pageSize: this.search.pageCount,
              projectId: this.$util.cookies.get("cuuren_projectId"),
              customerId: this.$util.cookies.get("customer_id")
            })
          }).then((data) => {
            if (data && data.code === 0) {
            this.data.list = data.page.list
            this.data.count = data.page.totalCount
          } else {
            this.data.list = []
            this.data.count =0
          }
        });

    },

      submitbtn(){
        let  operType=''
        let val = ''
        if(this.operType==='1'){
          if(this.oldobj["50004"] !==this.form.workmodel) {
            val = this.form.workmodel
            operType = '0007'
            this.controlDevice(this.meterCode, operType, val);
          }

          if(this.oldobj["50006"] !==this.form.doorstat) {
            val = this.form.doorstat
            operType = '0009'
            this.controlDevice(this.meterCode, operType, val);
          }

          if(this.oldobj["50007"] !==this.form.keylock) {
            val = this.form.keylock
            operType = '000A'
            this.controlDevice(this.meterCode, operType, val);
          }


        }else if(this.operType==='2'){
          if(this.oldobj["50005"] !==this.form.windstatu) {
            val = this.form.windstatu
            operType = '0008'
            this.controlDevice(this.meterCode, operType, val);
          }
        }
        this.menuVisibledialog = false;
      },

      showCtl(obj,meterCode,operType){
        this.oldobj = obj
        this.form = {
          workmodel: obj["50004"],
          windstatu: obj["50005"],
          doorstat: obj["50006"],
          keylock: obj["50007"],
          temperature: obj["50001"]
        }
        this.operType = operType
        this.meterCode = meterCode
        if(this.operType==='1'){
          this.opmenuTitle= "模式设置"
        }else if(this.operType==='2'){
          this.opmenuTitle= "风机设置"
        }

        this.menuVisibledialog = true;
      },

      controlDevice(deviceId,operType,val) {
        this.$api.okhttp({
          url: this.$http.adornUrl("/temp/ctl/"+deviceId+"/"+operType),
          method: "post",
          data: this.$http.adornData({
            value: val+'',
            customerId: this.$util.cookies.get("customer_id")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          this.menuVisibledialog = false;
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
            this.getmeterDataList();
        }
        });
        } else {
          this.$message.error("操作失败!");
        }
      });
      },
      open(metercode,value) {
        let text = '开机'
        let val = '1'
        if(value === '1'){
          text = '关机'
          val = '0'
        }
        this.$confirm(text+'?', '开关机控制', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.controlDevice(metercode,'0005',val)

      }).catch(() => {
        });
      },
      collectTypeNames(value,type) {
        return this.collectTypeValue[type][value]
      },
      showMenu(item,event){
        // debugger
        // parameter.preventDefault()
        // var x = parameter.clientX
        // var y = parameter.clientY
        this.rightClick(event, item,'1')

      },

      closeViewVisible(){
        this.viewVisile = false;
      },
      view(row){
        this.viewData = row;
        this.viewData.meterCodeName =this.viewData.meterCode
        //this.viewData.meterCodeName =this.viewData.meterCode+"["+ this.meterInfoList.find(item=>item.meterCode==this.viewData.meterCode).meterAddr+"]";
        this.viewData.meterTypeName =this.meterTypeList.find(item=>item.paramKey==this.viewData.meterType).paramValue;
        // console.log(this.subitemTypeList,this.viewData.subitemType);
        // console.log(this.subitemValueList,this.viewData.subitemValue);
        this.viewData.subitemTypeName="";
        if(this.viewData.subitemType!=""){
          this.viewData.subitemTypeName =this.subitemTypeList.find(item=>item.paramKey==this.viewData.subitemType).paramValue;
        }
        this.viewData.subitemValueName="";
        if(this.viewData.subitemValue!=null&&this.viewData.subitemValue!=""){
          this.viewData.subitemValueName =this.subitemValueList.find(item=>item.paramKey==this.viewData.subitemValue).paramValue;
        }
        //  console.log(this.viewData);
        this.viewVisile = true;
      },
      //保存修改区域信息
      saveBuild() {
        if (!this.currentNode || this.currentNode === "") {
          this.$message({
            message: "请先选择区域",
            type: "warning"
          });
          return;
        }
        this.$refs["currentbuildInfo"].validate(valid => {
          if (valid) {
            this.$api.okhttp({
              url: this.$http.adornUrl(`/ecs/ecsbuildinginfo/update`),
              method: "post",
              data: this.$http.adornData({
                buildingId: this.currentbuildInfo.buildingId || undefined,
                buildingName: this.currentbuildInfo.buildingName,
                parentBuildingId: this.currentbuildInfo.parentBuildingId,
                buildingType: this.currentbuildInfo.buildingType,
                buildingArea: this.currentbuildInfo.buildingArea,
                buildingPersons: this.currentbuildInfo.buildingPersons,
                projectId: this.currentbuildInfo.projectId,
                customerId: this.$util.cookies.get("customer_id")
              })
            }).then((data) => {
              if (data && data.code === 0) {
              this.$message({
                message: "操作成功",
                type: "success",
                duration: 1500,
                onClose: () => {
                this.getDataList();
              this.showInfo = true;
            }
            });
            } else {
              this.$message.error(data.msg);
            }
          });
          }
        });
      },
      getMeterDataList() {
        this.$api.okhttp({
          url: this.$http.adornUrl("/ecs/ecsmeterinfo/list"),
          method: "get",
          params: this.$http.adornParams({
            page: 1,
            limit: 10000000,
            customerId: this.$util.cookies.get("customer_id")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          this.meterInfoList = data.page.list;
        } else {
          this.meterInfoList = [];
        }
      });
      },
      closeMenuVisibledialog() {
        this.menuVisibledialog = false;
      },
      handleRightSelect(key) {
        this.menuSelected = key;
        if (key === "0") {
          // 添加选中节点的子节点
          this.menuVisible = false;
          this.addOrUpdateHandle("");
          // this.opmenuTitle='新建'
          // this.form.name='';
        }
        if (key === "1") {
          // 添加选中节点的子节点
          this.menuVisible = false;
          this.addOrUpdateHandle("");
          // this.opmenuTitle='新建'
          // this.form.name='';
        } else if (key === "2") {
          this.opmenuTitle = "修改";
          // 编辑节点
          this.menuVisibledialog = true;
          this.menuVisible = false;
          this.form.name = this.updateMenuNode.name;
        } else if (key === "3") {
          if (
            this.updateMenuNode.children &&
            this.updateMenuNode.children.length > 0
          ) {
            this.$message({
              message: "不能删除非叶子结点",
              type: "warning"
            });
            return;
          }
          var ids = [this.updateMenuNode.buildingId];
          // 删除节点
          this.$confirm("确认操作？", "提示", {
            confirmButtonText: "提交",
            cancelButtonText: "取消",
            type: "warning",
            center: true
          })
            .then(action => {
            this.$api.okhttp({
            url: this.$http.adornUrl("/ecs/ecsbuildinginfo/delete"),
            method: "post",
            data: this.$http.adornData(ids, false)
          }).then((data) => {
            if (data && data.code === 0) {
            this.$message({
              message: "操作成功",
              type: "success",
              duration: 1500,
              onClose: () => {
              this.getDataList();
          }
          });
          } else {
            this.$message.error(data.msg);
          }
        });
        })
        .catch(() => {});
        }
      },
      /**
       * 获取浏览器高度
       */
      getClientHeight() {
        let height = 0;
        if (window.innerHeight) {
          height = window.innerHeight;
        }
        if (document.body && document.body.clientHeight) {
          height = document.body.clientHeight;
        }
        if (
          document.documentElement &&
          document.documentElement.clientHeight &&
          document.documentElement.clientWidth
        ) {
          height = document.documentElement.clientHeight;
        }
        return height;
      },
      setContentHeight() {
        let height = this.getClientHeight();
        this.containerHeight = height - 150;
        this.treeHeight = height - 105;
      },
      // 鼠标右击，通过右键弹出菜单操作节点
      rightClick(event, object, flag) {
        this.updateMenuNode = object;
        // if (this.objectID !== object.id) {
        //   this.menuVisible = false
        // } else {
        this.menuVisible = true;
        // }
        document.addEventListener("click", e => {
          this.menuVisible = false;
      });
        let menu = document.querySelector("#rightClickMenu");
        // 菜单位置基于鼠标点击位置
        menu.style.left = event.clientX + "px";
        menu.style.top = event.clientY + "px";
        menu.style.position = "fixed";
        menu.style.width = "auto";
        menu.style.width = "auto";
        menu.style["z-index"] = "100";
      },
      selectBuild(data, node) {
        this.currentbuildInfo = data;
        this.currentNode = node;
        this.getmeterDataList();
      },
      getProjectDataList() {
        this.$api.okhttp({
          url: this.$http.adornUrl("/ecs/ecsprojectinfo/list"),
          method: "get",
          params: this.$http.adornParams({
            page: 1,
            limit: 10000000,
            customerId: this.$util.cookies.get("customer_id")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          this.projectList = data.page.list;
        } else {
          this.projectList = [];
        }
      });
      },
      /**
       * 获取参数枚举
       */
      queryStatic(type) {
        this.$api.okhttp({
          url: this.$http.adornUrl("/sys/sysstaticdata/getList"),
          method: "get",
          params: this.$http.adornParams({
            code: type,
            customerId: this.$util.cookies.get("customer_id")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          if (type === "meterType") {
            this.meterTypeList = data.page;
          } else if (type === "subitemType") {
            this.subitemTypeList = data.page;
          } else if (type === "subitemValue") {
            this.subitemValueList = data.page;
          } else if (type === "buildingType") {
            this.buildTypeList = data.page;
          }
        }
      });
      },
      // 获取数据列表
      getDataList (type) {
        if(type){
          this.pageIndex = 1
        }
        this.$api.okhttp({
          url: this.$http.adornUrl("/ecs/ecsbuildinginfo/select"),
          method: "get",
          params: this.$http.adornParams({
            page: this.pageIndex,
            limit: this.pageSize,
            key: this.dataForm.key,
            customerId: this.$util.cookies.get("customer_id"),
            'projectid': this.$util.cookies.get("cuuren_projectId")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          this.dataList = treeDataTranslate(
            data.menuList,
            "buildingId",
            "parentBuildingId"
          );
        } else {
          this.dataList = [];
        }
      });
      },
      // 获取关联计量器数据列表
      getmeterDataList(flag) {
        if (!this.currentNode || this.currentNode === "") {
          this.$message({
            message: "请先选择区域",
            type: "warning"
          });
          return;
        }

        if(flag){
          this.pageIndex =1
        }
        this.dataListLoading = true;
        this.$api.okhttp({
          url: this.$http.adornUrl("/temp/list"),
          method: "get",
          params: this.$http.adornParams({
            page: this.pageIndex,
            limit: this.pageSize,
            meterType:'8',
            buildingId: this.currentbuildInfo.buildingId,
            deviceName: this.dataForm.deviceName,
            meterCode: this.dataForm.meterCode,
            customerId: this.$util.cookies.get("customer_id")
          })
        }).then((data) => {
          if (data && data.code === 0) {
          this.meterdataList = data.data;
          //this.totalPage = data.page.totalCount;
          this.timeOut = setTimeout(()=>{ this.getmeterDataList(false); },10*60*1000);
        } else {
          this.meterdataList = [];
          this.totalPage = 0;
        }
        this.dataListLoading = false;
      });
      },
      // 每页数
      sizeChangeHandle(val) {
        this.pageSize = val;
        this.pageIndex = 1;
        this.getmeterDataList();
      },
      // 当前页
      currentChangeHandle(val) {
        this.search.pageIndex = val;
        this.getList();
      },
      // 多选
      selectionChangeHandle(val) {
        this.dataListSelections = val;
      },
      // 新增 / 修改
      addOrUpdateHandle(id) {
        this.addOrUpdateVisible = true;
        this.$nextTick(() => {
          this.$refs.addOrUpdate.init(
          id,
          this.buildTypeList,
          this.projectList,
          this.updateMenuNode
        );
      });
      },
      // 删除
      deleteHandle(id) {
        var ids = id
          ? [id]
          : this.dataListSelections.map(item => {
          return item.buildingId;
      });
        this.$confirm(
          `确定对[id=${ids.join(",")}]进行[${id ? "删除" : "批量删除"}]操作?`,
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          }
        ).then(() => {
          this.$api.okhttp({
          url: this.$http.adornUrl("/ecs/ecsbuildinginfo/delete"),
          method: "post",
          data: this.$http.adornData(ids, false)
        }).then(({ data }) => {
          if (data && data.code === 0) {
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
            this.getDataList();
        }
        });
        } else {
          this.$message.error(data.msg);
        }
      });
      });
      },
      // 新增 / 修改关联的计量器
      addOrUpdateHandlemeter(id) {
        if (!this.currentNode || this.currentNode === "") {
          this.$message({
            message: "请先选择区域",
            type: "warning"
          });
          return;
        }
        if (this.currentbuildInfo.buildingId === -1) {
          this.$message({
            message: "一级区域为虚拟结点不能绑定计量器",
            type: "warning"
          });
          return;
        }
        this.addOrUpdateVisiblemeter = true;
        this.$nextTick(() => {
          this.$refs.addOrUpdatemeter.init(
          id,
          this.subitemTypeList,
          this.subitemValueList,
          this.meterInfoList,
          this.currentbuildInfo
        );
      });
      },
      // 删除关联的计量器
      deleteHandlemeter(id) {
        var ids = id
          ? [id]
          : this.dataListSelections.map(item => {
          return item.id;
      });
        this.$confirm(
          `确定对[id=${ids.join(",")}]进行[${id ? "删除" : "批量删除"}]操作?`,
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          }
        ).then(() => {
          this.$api.okhttp({
          url: this.$http.adornUrl("/ecs/ecsbuildingmeter/delete"),
          method: "post",
          data: this.$http.adornData(ids, false)
        }).then((data) => {
          if (data && data.code === 0) {
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
            this.getmeterDataList();
        }
        });
        } else {
          this.$message.error(data.msg);
        }
      });
      });
      }
    }
  };
</script>
<style>
  .circle{width: 20px; height: 20px;
    /*background-color: #d6dddf; */
    border: 1.5px solid;border-color: #BFC3C0;  border-radius: 50%; -moz-border-radius: 50%; -webkit-border-radius: 50%; }
  .button:before{
    content: "";
    width: 8px;
    height: 8px;
    display: block;
    z-index: -1;
    position: relative;
  /*  background: #ddd;*/
    /*left: -15px;*/
    /*top: -15px;*/
    border-radius: 65px;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.4);
  }
  .button:after, .button2:after {
    content: "";
    color: #09F;
    font-size: 20px;
    width: 100%;
    height: 100%;
    line-height: 8px;
    text-align: center;
    position: absolute;
    top: 0;
    display: block;
  }
  .button, .button2 {
    /*float: left;*/
    margin: 5px 5px 0px 0px;
    cursor: pointer;
    height: 18px;
    width: 18px;
    display: block;
    /*position: relative;*/
    color: black;
    text-align: center;
    line-height: 18px;
    border-radius: 50px;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.5);
  /*  background: #d6dddf;*/
    transition: all 0.5s ease-in;
  }

  .tree-area { background-color: rgba(0, 0, 0, 0.1);
    width: 200px !important;
    /* box-shadow: 0px 0px 2px 2px #f7f6f6; */
    padding-top: 10px;
  }
  /*.icon-building {*/
    /*background: url("../../../assets/img/home.png");*/
    /*background-size: cover;*/
  /*}*/
  .bg-white {
    /*box-shadow: 0px 0px 2px 2px #f7f6f6;*/
  }
  .el-tree-node__content {
    height: 30px !important;
  }
  .menuItem {
    box-shadow: 0px 0px 2px 2px #f7f6f6;
    height: 40px;
    line-height: 40px;
  }
  .el-form-item{
    margin-top: 20px;
  }
  a {
    text-decoration: none;
  }
  /*正常的未被访问过的链接*/
  a:link {
    text-decoration: none;
  }
  /*已经访问过的链接*/
  a:visited {
    text-decoration: none;
  }
  /*鼠标划过(停留)的链接*/
  a:hover {
    text-decoration: none;
  }
  /* 正在点击的链接*/
  a:active {
    text-decoration: none;
  }
  .el-dialog__body{

    overflow: hidden;

  }
  a {
    text-decoration: none;
    color: #314659;
  &:hover {
     color: #1890ff;
   }
  }

  .text-center {
    text-align: center;
  }

  .ml5 {
    margin-left: 0.05rem;
  }

  .ml30 {
    margin-left: 0.3rem;
  }

  .ml50 {
    margin-left: 0.5rem;
  }

  .mt51 {

    /*margin-bottom:1px;*/
  }

  .mt10 {
    margin-top: 0.1rem;
  }

  .mr5 {
    margin-right: 0.05rem;
  }

  .ph15 {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .pv10 {
    padding-top: 0.5rem;
    padding-bottom: 0.1rem;
  }

  .gray {
    color: #ccc;
  }

  .line1 {
    font-weight: 600;
  }

  .flex1 {
    /*display: flex;*/
    position: absolute;
    top:80px;
  }
  .page-list1 {
   /* background-color: #e7e7e7;*/
    width: 100%;
   /* height: 90%;*/
    padding: 1.0rem 2.3rem;
    overflow: auto;

  .nav {
    margin: 1.2rem 1.1rem 1.05rem 1.1rem;
  }

  /*& > div {*/
      /*max-width: 12rem;*/
      /*margin: auto;*/
    /*}*/
  }

  .topo1 {
    /*position: relative;*/
    /*float: left;*/
    width: 250px;
    height: 7.3rem;
    margin: 0.5rem 0.5rem;
    border-radius: 2px;
    border:1px solid rgb(0, 110, 255);
  /*  background-color: rgb(217, 225, 240);*/

  .image {
    padding: 1.1rem 0.1rem 0.15rem 0.1rem;
    text-align: center;
    height: 1.85rem;
    border-bottom: 1px solid #f7f7f7;
    cursor: pointer;

  img {
    height: 100%;
    max-width: 100%;
  }
  }

  .title {
    font-size: 2.16rem;
    line-height: 2.24rem;
    height: 2.24rem;
    cursor: pointer;
    word-wrap:break-word
  }

  .desc {
    font-size: 1.12rem;
    line-height: 1.16rem;
    height: 2.32rem;
  }

  .iconfont {
    font-size: 1.16rem;
  }

  textarea {
  &.input {
     min-width: 0.3rem;
     width: 100%;
     max-width: 100%;
     font-size: 0.1rem;
     padding: 0.02rem 0.05rem;
     resize: none;
   }
  }

  .icon-delete {
    position: absolute;
    top: 0.05rem;
    right: 0.1rem;
  }
  }
</style>
